package com.ae.shield.common.items.shieldFittings.makers;

import net.minecraft.entity.LivingEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.DamageSource;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraftforge.energy.IEnergyStorage;

import java.util.List;

public class CreateShield extends ShieldMakerBase{
    public CreateShield() {
        super(new Properties(), new ShieldProperty()
                .recovery(10f)
                .cd(1)
                .maxIntensity(200f)
                .close(1f)
                .remote(1f)
                .magic(1f)
                .other(1f)
                .upperLimit(200f)
                .floorLimit(0f)
                .maxPiles(100)
                .penalty(0f)
                .cost(0));
    }

    @Override
    public void addCtrlInformation(List<ITextComponent> components, ItemStack stack) {
        components.add(new TranslationTextComponent("tooltip.ae.shield.create_shield.tip").mergeStyle(TextFormatting.GRAY));
    }

    @Override
    public float onEntityHurt(LivingEntity livingEntity, ItemStack stack, float amount, DamageSource source, IEnergyStorage energyCap) {
        return 0f;
    }

    @Override
    public boolean onEntityDeath(ItemStack stack, LivingEntity livingEntity, DamageSource source, IEnergyStorage energyStorage) {
        return true;
    }
}
